import TabsView from '@/layouts/tabs/TabsView'
// import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置

const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '/index',
      name: '首页',
      component: () => import('@/pages/index/index.vue')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children:[{
        path: 'index',
        name: '首页',
        meta: {
          icon: 'dashboard'
        },
        component: () => import('@/pages/index/index.vue'),
      },
      {
        path: 'projectList',
        name: '项目列表',
        meta: {
          icon: 'database',
          level:'1',
        },
        component: () => import('@/pages/project/projectList.vue'),
      },
      {
        path: 'instrumentTool',
        name: '仪表工具',
        meta: {
          icon: 'pie-chart',
          level:'1',
        },
        component: () => import('@/pages/instrumentTool/instrumentTool.vue'),
      },
      {
        path: 'undoList',
        name: '待办中心',
        meta: {
          icon: 'table',
          level:'1',
        },
        component: () => import('@/pages/undoList/undoList.vue'),
      },
      {
        path: 'list',
        name: '表格组件',
        meta: {
          icon: 'table',
          level:'1',
        },
        component: PageView,
        children: [
          {
            path: 'query',
            name: '查询表格',
            level:'1',
            component: () => import('@/pages/list/query'),
          },
          {
            path: 'multiHeader',
            name: '多级表头',
            level:'1',
            component: () => import('@/pages/list/multiHeader'),
          },
          {
            path: 'editTable',
            name: '可编辑表格',
            level:'1',
            component: () => import('@/pages/list/editTable'),
          },
        ]
      },
      {
        path: 'form',
        name: '表单组件',
        meta: {
          icon: 'form',
          level:'2',
          page: {
            cacheAble: false
          }
        },
        component: PageView,
        children: [
          {
            path: 'basic',
            name: '基础表单',
            level:'2',
            component: () => import('@/pages/form/basic'),
          },
          {
            path: 'advance',
            name: '高级表单',
            level:'2',
            component: () => import('@/pages/form/advance'),
          }
        ]
      },
      // {
      //   path: 'exception',
      //   name: '异常页',
      //   meta: {
      //     icon: 'warning',
      //   },
      //   component: BlankView,
      //   children: [
      //     {
      //       path: '404',
      //       name: 'Exp404',
      //       component: () => import('@/pages/exception/404')
      //     },
      //     {
      //       path: '403',
      //       name: 'Exp403',
      //       component: () => import('@/pages/exception/403')
      //     },
      //     {
      //       path: '500',
      //       name: 'Exp500',
      //       component: () => import('@/pages/exception/500')
      //     }
      //   ]
      // }
      ]
    },
  ],
  
}

export default options